// 可选参数
function f3(x?: number) {
  // todo
}

f3()
f3(1)

let myFunc: (a: number, b?: number) => number
let myFunc2: (a: number | undefined, b?: number) => number

myFunc = function (x, y) {
  if (y === undefined) {
    return x
  }
  return x + y
}
